package com.macro.mall.tiny.shejimoshi.xiangyuan;

public class Client {
    public static void main(String[] args) {
        //创建一个工程类
        WebSiteFactory webSiteFactory = new WebSiteFactory();
 
        //A以一个新闻形式发布网站
        WebSite newsWebsite = webSiteFactory.getWebSiteCategory("新闻");
        newsWebsite.use(new User("A"));
        //B以一个博客形式发布网站
        WebSite blogWebsite1 = webSiteFactory.getWebSiteCategory("博客");
        blogWebsite1.use(new User("B"));
        //C以一个博客形式发布网站
        WebSite blogWebsite2 = webSiteFactory.getWebSiteCategory("博客");
        blogWebsite2.use(new User("C"));
        //D以一个博客形式发布网站
        WebSite blogWebsite3 = webSiteFactory.getWebSiteCategory("博客");
        blogWebsite3.use(new User("D"));
 
        //实际网站发布分类实例
        System.out.println("实际网站发布分类实例："+webSiteFactory.getWebSiteCount());
 
    }
}